package cn.crm.bean;

import java.util.Date;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import static javax.persistence.GenerationType.SEQUENCE;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.SequenceGenerator;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

/**
 * RecordLog entity. @author MyEclipse Persistence Tools
 */
@Entity
@Table(name = "RL_RECORDLOG")
public class RecordLog implements java.io.Serializable {

	// Fields

	private Integer rlRecordid;
	private DDL DDLByTypeEffect;
	private DDL DDLByTypeRecordtype;
	private DDL DDLByTypeRecordstyle;
	private Integer rlAid;
	private Date rlEndtime;

	// Constructors

	/** default constructor */
	public RecordLog() {
	}

	/** full constructor */
	public RecordLog(DDL DDLByTypeEffect, DDL DDLByTypeRecordtype,
			DDL DDLByTypeRecordstyle, Integer rlAid, Date rlEndtime) {
		this.DDLByTypeEffect = DDLByTypeEffect;
		this.DDLByTypeRecordtype = DDLByTypeRecordtype;
		this.DDLByTypeRecordstyle = DDLByTypeRecordstyle;
		this.rlAid = rlAid;
		this.rlEndtime = rlEndtime;
	}

	// Property accessors
	@SequenceGenerator(name = "generator",sequenceName="seq_recordlog")
	@Id
	@GeneratedValue(strategy = SEQUENCE, generator = "generator")
	@Column(name = "RL_RECORDID", unique = true, nullable = false, precision = 8, scale = 0)
	public Integer getRlRecordid() {
		return this.rlRecordid;
	}

	public void setRlRecordid(Integer rlRecordid) {
		this.rlRecordid = rlRecordid;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TYPE_EFFECT")
	public DDL getDDLByTypeEffect() {
		return this.DDLByTypeEffect;
	}

	public void setDDLByTypeEffect(DDL DDLByTypeEffect) {
		this.DDLByTypeEffect = DDLByTypeEffect;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TYPE_RECORDTYPE")
	public DDL getDDLByTypeRecordtype() {
		return this.DDLByTypeRecordtype;
	}

	public void setDDLByTypeRecordtype(DDL DDLByTypeRecordtype) {
		this.DDLByTypeRecordtype = DDLByTypeRecordtype;
	}

	@ManyToOne(fetch = FetchType.LAZY)
	@JoinColumn(name = "TYPE_RECORDSTYLE")
	public DDL getDDLByTypeRecordstyle() {
		return this.DDLByTypeRecordstyle;
	}

	public void setDDLByTypeRecordstyle(DDL DDLByTypeRecordstyle) {
		this.DDLByTypeRecordstyle = DDLByTypeRecordstyle;
	}

	@Column(name = "RL_AID", precision = 6, scale = 0)
	public Integer getRlAid() {
		return this.rlAid;
	}

	public void setRlAid(Integer rlAid) {
		this.rlAid = rlAid;
	}

	@Temporal(TemporalType.DATE)
	@Column(name = "RL_ENDTIME", length = 7)
	public Date getRlEndtime() {
		return this.rlEndtime;
	}

	public void setRlEndtime(Date rlEndtime) {
		this.rlEndtime = rlEndtime;
	}

}